#7-6 分期付款计算器【组合数据类型】

# 等额本息还款公式:
# 每月还款额=贷款本金*月利率*(1+月利率)**总还款月数/((1+月利率)**总还款月数-1)
# 等额本金（AC）还款公式:
# 每月还款额=贷款本金/总还款月数+(贷款本金-累计已还款本金)*月利率
price,month,mode,rate = float(input()),int(input()),input(),float(input())
if mode == 'AC':
    ls = []
    for i in range(month):
        repayment = price / month + (price - price / month * i) * rate
        ls.append(round(repayment,2))
    print(ls)
elif mode == 'ACPI':
    repayment = price * rate * (1 + rate) ** month /((1 + rate) ** month - 1)
    print(round(repayment,2))
else:
    print('还款方式输入错误')